This script illustrates how to build and verify a digital signature. In this case we are verifying an encrypted text, but you could verify a plaintext in the same fashion.